import Layout from '@/views/layout.vue'
import FindHouse from '@/views/FindHouse.vue'
import News from '@/views/news.vue'
import HomePage from '@/views/HomePage.vue'
import My from '@/views/My.vue'
import Detail from '@/views/fh-detail.vue'

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/HomePage',
    //配置二级路由规则
    children: [
      {
        name: 'HomePagele',
        path: 'HomePage',
        component: HomePage,
      },
      {
        path: 'FindHouse',
        component: FindHouse,
      },
      {
        path: 'news',
        component: News,
      },
      {
        path: 'My',
        component: My,
      },
    ],
  },
  {
    name: 'detail',
    path: '/detail',
    component: Detail,
  },
]

export default routes
